cd server
cargo build --release
cd ../web
npm run build
cd ..
rm -rf .build
mkdir -p .build
mkdir -p .build/var/www/html
mkdir -p .build/usr/share/cbms
mkdir -p .build/usr/lib/systemd/system
cp -r web/dist/* .build/var/www/html/
cp -r server/target/release/server .build/usr/share/cbms/server
cp -r cbms.service .build/usr/lib/systemd/system/
cp -r start.sh .build/usr/share/cbms/
cp -r server/.env .build/usr/share/cbms/
cp -r migrations/* .build/usr/share/cbms/

cd .build
tar zcvf ../cbms.tar.gz usr var 